package com.suliao.library.serviceImpl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.suliao.library.entity.User;
import com.suliao.library.mapper.UserMapper;
import com.suliao.library.service.UserService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;


/**
 * @author： M1nG-CodeGenerator
 * @since： 2020-09-10 17:40:31
 * @description： 用户 服务实现类
 * @version： 1.0
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public Page<User> getUserById(Page page, Integer id) {
        List<User> user = userMapper.getUserById(page, id);
        return page.setRecords(user);
    }

    @Override
    public List<User> getUserByName() {
        return userMapper.getUserByName();
    }


}
